
#include "ENRadiationHeatFluxBC.h"
#include "libmesh/meshfree_interpolation.h"
#include "libmesh/system.h"
#include "libmesh/radial_basis_interpolation.h"

using namespace std;

registerMooseObject("RoshanApp", ENRadiationHeatFluxBC);

template<>
InputParameters validParams<ENRadiationHeatFluxBC>()
{
	InputParameters params = validParams<IntegratedBC>();
	return params;
}

ENRadiationHeatFluxBC::ENRadiationHeatFluxBC(const InputParameters & parameters) :
	IntegratedBC(parameters),
	_flux(getMaterialProperty<Real>("MC_radiation_heat_flux")),
	_flux_jacobi(getMaterialProperty<Real>("MC_radiation_heat_flux_jacobi"))
{
}

Real ENRadiationHeatFluxBC::computeQpResidual()
{
	Real flux = _flux[_qp];
	return -_test[_i][_qp]*flux;
}

Real ENRadiationHeatFluxBC::computeQpJacobian()
{
	Real jacobi = _flux_jacobi[_qp];
	return -_test[_i][_qp]*_phi[_j][_qp]*jacobi;
}


